import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:smart_freezer/core/resources/app_config.dart';

class LCNavigationBar extends StatelessWidget {
  
  bool isHideBack;
  String title;
  LCNavigationBar({this.isHideBack = true, required this.title});
  
  @override
  Widget build(BuildContext context) {
    return Container(
      height: 50,
      width: MainCommon.screenWidth,
      alignment: Alignment.center,
      child: Row(
        mainAxisAlignment: MainAxisAlignment.spaceBetween,
        children: [
          InkWell(
            onTap: () {
              Get.back();
            },
            child: Container(
              width: 50,
              height: 50,
              padding: EdgeInsets.only(left: 8),
              child: Offstage(
                  offstage: isHideBack,
                  child: Icon(Icons.arrow_back_ios, color: Colors.white, size: 20,)
              ),
            ),
          ),
          Text(title, style: TextStyle(color: Colors.white, fontSize: 20, fontWeight: FontWeight.bold),),

          SizedBox(width: 50,)
        ],
      ),
    );
  }
}
